#pragma once

#include "messiah/mcommon.h"

#include <string>
#include <vector>

namespace renderit
{
	namespace messiah
	{
		class repo_item;

		class repo_res
		{
		public:
			repo_res(repo_item * item, const std::string& dir)
				: item_(item)
				, dir_(dir)
			{
			}

			virtual ~repo_res() {}

		public:
			virtual void load() {}

			virtual void save() {}

			virtual uint32 replace_guid(const std::string& from_guid, const std::string& to_guid) { return 0; }

			virtual std::vector<std::string> get_deps() { return std::vector<std::string>(); }

		public:
			const std::string& get_md5();
			uint32 get_fsize();

		private:
			std::string md5_;
			uint32 fsize_;

		protected:
			std::string dir_;
			repo_item * item_;
		};
	}
}